package com.cskaoyan.javase.stringbuffer;

/**
 * @description: api的使用
 * @author: wuguidong@cskaoyan.onaliyun.com
 **/

public class Demo3 {
    public static void main(String[] args) {
        StringBuffer sb = new StringBuffer();
        // public int capacity() 返回当前容量,数组的长度,理论值
        //返回的是value数组的长度
        System.out.println(sb.capacity()); //16
        sb.append("abc");
        // public int length() 返回长度(字符的个数),实际值
        System.out.println(sb.length());  //0

    }
}
